<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="style/pics.css" />
<script>

function toAlbum(album_name,edit_mode) {
	if (edit_mode == '1') {
		window.location = "<?= $base ?>upload/addImages?album_name="+album_name;
	} else {
		window.location = "<?= $base ?>albums/viewImages?album_name="+album_name;
	}
}

function toAlbum() {
	window.location = "<?= $base ?>albums/addAlbum";
}


</script>
</head>
<body>
<div id=album_wrapper>
<?php foreach ($albums as $album_name) {?>
		<div class="album" onclick="toAlbum('<?= $album_name ?>','<?= $edit_mode ?>')" onmouseover=""style="cursor: pointer;">
			<div class="album-label"><?= $album_name ?></div>
		</div>
	<?php } ?>
	<?php if ($edit_mode = '1') { ?>
		<div class="album" onclick="toAlbum()" onmouseover=""style="cursor: pointer;">
			<div class="album-label">
				add a new album
			</div>
		</div>
	<?php } ?>
</div>
</body>
</html>
